using System;
using System.Windows.Forms;

namespace WindowsControlers
{
    public class ControlDock
    {
        public static void Main(string[] args)
        {
            System.Windows.Forms.Form form1 = new System.Windows.Forms.Form()
            {
                Text = "ControlDock",
                Size = new System.Drawing.Size(400, 300),
                Location = new System.Drawing.Point(300, 100),
                Icon = new System.Drawing.Icon(@"D:\UI\dailybox\logo.ico"),
                MaximizeBox = false,
				MinimizeBox = true,
				Padding = new System.Windows.Forms.Padding(10),
				//FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
				FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable
            };
			
			System.Windows.Forms.Label label1 = new System.Windows.Forms.Label(){
				BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D,
				Dock = System.Windows.Forms.DockStyle.Fill,
				Name = "label1",
				Text = "Label1",
				Size = new System.Drawing.Size(364, 97),
				Location = new System.Drawing.Point(0,0)
			};

			System.Windows.Forms.Button button1 = new System.Windows.Forms.Button(){
				Dock = System.Windows.Forms.DockStyle.Fill,
				Name = "button1",
				Text = "Button1",
				Size = new System.Drawing.Size(364, 33),
				Location = new System.Drawing.Point(0,0),
				UseVisualStyleBackColor = true
			};

			System.Windows.Forms.Panel panel1 = new System.Windows.Forms.Panel(){
				Name = "panel1",
				Dock = System.Windows.Forms.DockStyle.Top,
				Location = new System.Drawing.Point(10, 10),
				Size = new System.Drawing.Size(364, 97),
				TabIndex = 0
			};
			
			System.Windows.Forms.Panel panel2 = new System.Windows.Forms.Panel(){				
				Location = new System.Drawing.Point(10, 107),
				Dock = System.Windows.Forms.DockStyle.Fill,
				Name = "Panel2",
				Size = new System.Drawing.Size(364, 33),
				TabIndex = 1
			};
						
			panel1.SuspendLayout();
			panel2.SuspendLayout();
			form1.SuspendLayout();
			panel1.Controls.Add(label1);
			panel2.Controls.Add(button1);
			form1.Controls.Add(panel1);
			form1.Controls.Add(panel2);

			button1.Click += (sender, e) => {
				label1.Text = System.DateTime.Now.ToString();
			};

			panel1.ResumeLayout(false);
			panel2.ResumeLayout(false);
			form1.ResumeLayout(false);

            Application.Run(form1);
        }
    }
}